Skip to content

refactor: collapse paired picker-open booleans and tidy boot-size cleanup - #4493

Merged
tyler-dane merged 1 commit into
mainfrom
claude/kind-dirac-2j2xpy
Oct 16, 2026
Merged

tyler-dane merged 1 commit into
mainfrom
claude/kind-dirac-2j2xpy

Conversation

@tyler-dane

@tyler-dane tyler-dane commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Technical-debt sweep of the last seven days of merges, picking up what the
earlier sweeps (#4447, #4456, #4457, #4474, #4476, #4477, #4490) left. Three
items, all behavior-preserving.

Paired picker-open booleans (from #4454 / #4456). The event form tracked
its start and end date pickers as two independent booleans, so both could be
open at once and every open handler had to remember to close its sibling.
EventForm owned the pair and threaded four props through DateTimeSection
into DatePickers; TimePickers then hand-rolled the same pair locally with
its own openStartDate / openEndDate helpers and a
(changed === "start" ? setA : setB)(false) idiom. useOpenDatePickerSide
holds the open side ("start" | "end" | null) instead: one prop replaces
four, and close(side) ignores a close from the side that is not open, which
is what the sibling-closing dance was protecting against (react-datepicker
reports the outgoing picker's close after the incoming one has opened). New
unit tests pin that rule and closeAll.

Duplicated banner kind (from #4479). NotificationPermissionBanner
re-declared "permission" | "show_blocked" instead of importing
NotificationBlockedBannerKind from the util that picks it.

Boot-size delta cleanup (from #4466). process.exit(1) inside the try
block skipped the finally that removes the base worktree and the temp
metrics file, so every over-budget PR leaked both. The same finally ran
git worktree remove on a directory that git worktree add may never have
created, throwing over the real error; it now cleans up the bare mkdtemp
directory in that case. The sticky comment posts and patches through one
gh api call rather than writing a temp file for the create path only.

Left alone on purpose: the web view-model's series-master reminder fallback
duplicating sync's (old occurrence rows still need it, as #4490 noted); the
hasDismissed / dismiss localStorage pairs repeated across banner utils
(a shared bool-flag helper would touch six unrelated files); the two time
menu booleans in TimePickers, since TimePicker takes a boolean setter and
mutual exclusion there is not today's behavior; civil-day grid helpers and
the OAuth callback/analytics split, both already tidy after #4474.

Not reviewed: the macOS Swift batch (#4481 - #4488), the largest churn in the
window. No Swift toolchain in this sandbox, so any change there would be
unverifiable before CI.

Verify

bun run verify --strict

VERDICT: FAIL

Checks run: type-check, lint, knip, test:a11y (65/65), test:e2e
(247/247), test:web. Nothing skipped.

The only failure is test:web, and it is this sandbox, not the diff: shard
3/6 trips the runner's 5000 MB RSS cap (5500 MB) at
components/SelectView/SelectView.test.tsx, a file three directories away
from anything here. Stashing the diff and rerunning on the unmodified base
trips the same cap in the same shard at the same file (5355 MB), and the same
cap hits a views/** subset on the base tree too. CI's own unit-leg (web, 1)
and unit-leg (web, 2) are both green on this head, which is the authority on
the web suite.

Positive evidence for the files this PR touches, run as subsets under the
repo's web profile:

  • DateControlsSection/DateTimeSection/**: 43 pass, 0 fail
  • views/Forms/**: 311 pass (307 on base, +4 from the new hook test), with
    the same 2 pre-existing EventForm provider-managed staging UX subset
    failures on base and on this branch
  • useOpenDatePickerSide.test.ts: 4 pass
  • e2e/event-form, e2e/allday, e2e/accessibility/datepicker-a11y: 6 pass

The boot-size workflow exercised the rewritten comment path on this PR and
posted its sticky comment (+0.0 KB vs main).

🤖 Generated with Claude Code

https://claude.ai/code/session_015fhM8mEj3LaYCn8My4M9u3

…anup

Three paydowns on last week's merges.

The event form tracked its start/end date pickers as two independent
booleans, so both could be open at once and every open handler had to
remember to close its sibling. EventForm threaded four props through
DateTimeSection into DatePickers to do it, and TimePickers hand-rolled the
same pair again with its own open helpers. One `useOpenDatePickerSide` hook
holds the open side instead, and `close(side)` ignores a close from the
side that is not open, which is what the sibling-closing dance was
protecting against.

NotificationPermissionBanner re-declared the banner kind union instead of
importing NotificationBlockedBannerKind from the util that picks it.

pr-boot-size-delta exited inside its try block on a budget failure, which
skipped the finally that removes the base worktree and the temp metrics
file, and the same finally removed a worktree that `git worktree add` may
never have created, throwing over the real error. The sticky comment now
posts and patches through one `gh api` call instead of writing a temp file
for the create path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015fhM8mEj3LaYCn8My4M9u3
@github-actions

Copy link
Copy Markdown
Contributor

Boot bundle: 508.0 KB gzip (+0.0 KB vs main)

@tyler-dane
tyler-dane marked this pull request as ready for review October 16, 2026 10:30
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 16, 2026 — with Claude
@tyler-dane
tyler-dane added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 537d703 Oct 16, 2026
31 checks passed
@tyler-dane
tyler-dane deleted the claude/kind-dirac-2j2xpy branch October 16, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-automerge Agent-loop finished; merge-guard may squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants